//
//  CollectionViewCellTest.swift
//  SwiftTest
//
//  Created by appleTwo on 2019/3/12.
//  Copyright © 2019 QiKai. All rights reserved.
//

import UIKit

class CollectionViewCellTest: UICollectionViewCell {
    
    var lab:UILabel!
    var data = 0{
        didSet{
           lab.text = String(data)
        }
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.contentView.backgroundColor = UIColor.randomColor;
        lab = UILabel.init()
        self.contentView.addSubview(lab)
        lab.snp.makeConstraints { (make) in
            make.center.equalToSuperview()
            make.height.equalTo(20)
        }
    }
    override func layoutSubviews() {
        super.layoutSubviews()
    }
}







